<template>
  <div style="background-color: white">
    <carousel height="818px" :carouselList="carouselList"></carousel>
    <!-- <el-carousel height="818px">
      <el-carousel-item v-for="(item, key) in 4" :key="key">
        <div>
          <el-image
            src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
            style="width: 100%; height: 818px"
            fit="cover"
          ></el-image>
        </div>
      </el-carousel-item>
    </el-carousel> -->

    <div class="index-body">
      <!-- 热销商品 -->
      <div style="margin-top: 30px; padding: 0 88px">
        <div style="justify-content: space-between; align-items: center; display: flex">
          <div class="title">
            {{ $store.state.locale == "zh-cn" ? "热销产品" : "Hot-sale Products" }}
          </div>

          <div style="display: flex; align-items: center">
            <div
              style="
                display: flex;
                justify-content: center;
                align-items: center;
                position: relative;

                cursor: pointer;
                line-height: 50px;

                padding: 0 20px;
              "
              @mouseenter="mouseenter"
              @mouseleave="mouseleave"
            >
              <div style="font-size: 15px">
                {{ checkName }}
              </div>
              <div
                style="
                  width: 26px;
                  height: 50px;
                  display: flex;
                  align-items: center;
                  margin-left: 5px;
                "
              >
                <img
                  v-if="show"
                  src="@/assets/img/arrow-top.png"
                  style="width: 20px; height: 20px"
                  alt=""
                />
                <img
                  v-else
                  src="@/assets/img/arrow-bottom.png"
                  style="width: 20px; height: 20px"
                  alt=""
                />
              </div>
              <!--  -->
              <div
                v-if="show"
                :style="$store.state.locale == 'zh-cn' ? 'width:100%' : 'width:240px'"
                style="
                  position: absolute;

                  display: flex;
                  border: 2px solid rgba(232, 232, 232, 1);
                  background: rgba(251, 251, 251, 0.9);
                  flex-direction: column;
                  align-items: center;
                  top: 50px;
                  font-size: 16px;
                  z-index: 2;
                  padding: 10px 0;
                "
              >
                <div
                  style="cursor: pointer"
                  class="choose"
                  :class="checkId == item.id ? 'goodsActive' : 'goodsNormal'"
                  v-for="item in chooseData"
                  :key="item.id"
                  @click="clickSlides(item)"
                >
                  {{ item.name }}
                </div>
              </div>
            </div>
            <div
              @click="push(1)"
              class="all"
              @mouseenter="mouseenterMore(1)"
              @mouseleave="mouseleaveMore()"
            >
              <div class="text" style="font-size: 14px">
                {{ $store.state.locale == "zh-cn" ? "查看全部" : "Discover All" }}
              </div>
              <img
                v-if="moreId == 1"
                src="@/assets/img/arrow-w-right.png"
                style="width: 20px; height: 14px; margin-top: 2px; margin-left: 4px"
                alt=""
              />
              <img
                v-else
                src="@/assets/img/arrow-b-right.png"
                style="width: 20px; height: 14px; margin-top: 2px; margin-left: 4px"
                alt=""
              />
            </div>
          </div>
        </div>
        <div style="margin-top: 30px; width: 100%">
          <div style="display: flex">
            <div style="display: flex">
              <div
                v-for="(item, index) in info.goodsData"
                :key="index"
                style="margin-right: 20px"
                class="goods"
                @click="detail(item)"
              >
                <div style="width: 260px; height: 260px; position: relative">
                  <img
                    :src="item.image_first"
                    style="width: 260px; height: 260px"
                    alt=""
                  />
                  <div style="position: absolute; top: 0; right: 0">
                    <img
                      src="@/assets/img/hot.png"
                      style="width: 50px; height: 50px"
                      alt=""
                    />
                  </div>
                </div>
                <div style="margin-top: 18px; text-align: center; font-size: 14px">
                  {{ item.title }}
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div>
        <lines></lines>
      </div>
      <!-- 品牌故事 -->
      <div style="padding: 0 88px">
        <div class="title">
          {{ $store.state.locale == "zh-cn" ? "品牌故事" : "Brand Story" }}
        </div>
        <div style="margin-top: 30px; display: flex; align-items: center">
          <div style="width: 600px; height: 400px">
            <img
              :src="info.brand.introduce.image"
              alt=""
              style="width: 600px; height: 400px; object-fit: cover"
            />
            <!-- <el-image
              :src="info.brand.introduce.image"
              fit="cover"
              style="width: 600px; height: 400px"
            ></el-image> -->
          </div>
          <div style="margin-left: 57px; width: 803px">
            <div
              style="font-size: 16px; line-height: 41px; text-indent: 2em"
              class="ellipsis7"
            >
              {{ info.brand.introduce.info }}
            </div>
            <div style="display: flex; justify-content: center; margin-top: 60px">
              <div
                class="more"
                @click="push(2)"
                @mouseenter="mouseenterMore(2)"
                @mouseleave="mouseleaveMore()"
              >
                <div style="font-size: 14px" class="text">
                  {{ $store.state.locale == "zh-cn" ? "了解更多" : "Explore More" }}
                </div>
                <div style="width: 20px; height: 14px; margin-left: 5px; display: flex">
                  <img
                    v-if="moreId == 2"
                    src="@/assets/img/arrow-w-right.png"
                    style="width: 20px; height: 14px"
                    alt=""
                  />
                  <img
                    v-else
                    src="@/assets/img/arrow-b-right.png"
                    style="width: 20px; height: 14px"
                    alt=""
                  />
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div>
        <lines></lines>
      </div>

      <!-- 赛事合作 -->
      <div style="padding: 0 88px">
        <div style="display: flex; align-items: end">
          <div
            :class="flag == 1 ? 'active' : 'normal'"
            @click="
              flag = 1;
              getDynamic();
            "
          >
            {{ $store.state.locale == "zh-cn" ? "赛事合作" : "Competition Cooperation" }}
          </div>
          <div
            :class="flag == 2 ? 'active' : 'normal'"
            @click="
              flag = 2;
              getDynamic();
            "
            style="margin-left: 30px"
          >
            {{ $store.state.locale == "zh-cn" ? "新闻活动" : "News and Events" }}
          </div>
        </div>
        <div style="margin-top: 30px" class="carousel">
          <el-carousel height="600px" :autoplay="false" indicator-position="none">
            <el-carousel-item v-for="item in info.newsList" :key="item.id">
              <div style="color: #000000">
                <el-image
                  :src="item.images[0]"
                  fit="cover"
                  style="width: 100%; height: 500px"
                ></el-image>

                <div
                  style="
                    margin-top: 32px;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                  "
                >
                  <div>
                    <div style="font-size: 20px; color: #000000; font-weight: bold">
                      {{ item.title }}
                    </div>
                    <div
                      style="
                        font-size: 16px;
                        font-weight: 500;
                        margin-top: 12px;
                        width: 800px;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        white-space: nowrap;
                      "
                    >
                      {{ item.subtitle }}
                    </div>
                  </div>
                  <div>
                    <div
                      @click="push(3)"
                      class="more"
                      @mouseenter="mouseenterMore(3)"
                      @mouseleave="mouseleaveMore()"
                    >
                      <div style="font-size: 14px" class="text">
                        {{ $store.state.locale == "zh-cn" ? "了解更多" : "Explore More" }}
                      </div>
                      <div
                        style="width: 20px; height: 14px; margin-left: 5px; display: flex"
                      >
                        <img
                          v-if="moreId == 3"
                          src="@/assets/img/arrow-w-right.png"
                          style="width: 20px; height: 14px"
                          alt=""
                        />
                        <img
                          v-else
                          src="@/assets/img/arrow-b-right.png"
                          style="width: 20px; height: 14px"
                          alt=""
                        />
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </el-carousel-item>
          </el-carousel>
        </div>
      </div>
      <div>
        <lines></lines>
      </div>
      <!-- 多威科技 -->
      <div style="padding: 0 88px">
        <div style="display: flex; justify-content: space-between; align-items: center">
          <div class="title">
            {{ $store.state.locale == "zh-cn" ? "多威科技" : "Technology" }}
          </div>
          <div
            @click="push(4)"
            class="more"
            @mouseenter="mouseenterMore(4)"
            @mouseleave="mouseleaveMore()"
          >
            <div style="font-size: 14px" class="text">
              {{ $store.state.locale == "zh-cn" ? "了解更多" : "Explore More" }}
            </div>
            <div style="width: 20px; height: 14px; margin-left: 5px; display: flex">
              <img
                v-if="moreId == 4"
                src="@/assets/img/arrow-w-right.png"
                style="width: 20px; height: 14px"
                alt=""
              />
              <img
                v-else
                src="@/assets/img/arrow-b-right.png"
                style="width: 20px; height: 14px"
                alt=""
              />
            </div>
          </div>
        </div>

        <div style="margin-top: 30px; width: 100%; height: 500px; position: relative">
          <!-- <img :src="technologyImage" style="width: 100%; height: 500px" alt="" /> -->

          <main>
            <ul class="slider">
              <li
                class="item"
                style="
                  background-image: url('https://cdn.mos.cms.futurecdn.net/dP3N4qnEZ4tCTCLq59iysd.jpg');
                "
              >
                <div class="content">
                  <h2 class="title">"Lossless Youths"</h2>
                  <p class="description">
                    Lorem ipsum, dolor sit amet consectetur adipisicing elit. Tempore fuga
                    voluptatum, iure corporis inventore praesentium nisi. Id laboriosam
                    ipsam enim.
                  </p>
                  <button>Read More</button>
                </div>
              </li>
              <li
                class="item"
                style="background-image: url('https://i.redd.it/tc0aqpv92pn21.jpg')"
              >
                <div class="content">
                  <h2 class="title">"Estrange Bond"</h2>
                  <p class="description">
                    Lorem ipsum, dolor sit amet consectetur adipisicing elit. Tempore fuga
                    voluptatum, iure corporis inventore praesentium nisi. Id laboriosam
                    ipsam enim.
                  </p>
                  <button>Read More</button>
                </div>
              </li>
              <li
                class="item"
                style="
                  background-image: url('https://wharferj.files.wordpress.com/2015/11/bio_north.jpg');
                "
              >
                <div class="content">
                  <h2 class="title">"The Gate Keeper"</h2>
                  <p class="description">
                    Lorem ipsum, dolor sit amet consectetur adipisicing elit. Tempore fuga
                    voluptatum, iure corporis inventore praesentium nisi. Id laboriosam
                    ipsam enim.
                  </p>
                  <button>Read More</button>
                </div>
              </li>
              <li
                class="item"
                style="
                  background-image: url('https://images7.alphacoders.com/878/878663.jpg');
                "
              >
                <div class="content">
                  <h2 class="title">"Last Trace Of Us"</h2>
                  <p class="description">
                    Lorem ipsum, dolor sit amet consectetur adipisicing elit. Tempore fuga
                    voluptatum, iure corporis inventore praesentium nisi. Id laboriosam
                    ipsam enim.
                  </p>
                  <button>Read More</button>
                </div>
              </li>
              <li
                class="item"
                style="
                  background-image: url('https://theawesomer.com/photos/2017/07/simon_stalenhag_the_electric_state_6.jpg');
                "
              >
                <div class="content">
                  <h2 class="title">"Urban Decay"</h2>
                  <p class="description">
                    Lorem ipsum, dolor sit amet consectetur adipisicing elit. Tempore fuga
                    voluptatum, iure corporis inventore praesentium nisi. Id laboriosam
                    ipsam enim.
                  </p>
                  <button>Read More</button>
                </div>
              </li>
              <li
                class="item"
                style="
                  background-image: url('https://da.se/app/uploads/2015/09/simon-december1994.jpg');
                "
              >
                <div class="content">
                  <h2 class="title">"The Migration"</h2>
                  <p class="description">
                    Lorem ipsum, dolor sit amet consectetur adipisicing elit. Tempore fuga
                    voluptatum, iure corporis inventore praesentium nisi. Id laboriosam
                    ipsam enim.
                  </p>
                  <button>Read More</button>
                </div>
              </li>
            </ul>
            <nav class="nav">
              <ion-icon class="btn prev" name="arrow-back-outline"></ion-icon>
              <ion-icon class="btn next" name="arrow-forward-outline"></ion-icon>
            </nav>
          </main>
        </div>
      </div>
      <div>
        <lines></lines>
      </div>
      <!-- 资质荣誉 -->
      <div style="padding: 0 88px 50px 88px">
        <div style="display: flex; justify-content: space-between; align-items: center">
          <div class="title">
            {{ $store.state.locale == "zh-cn" ? "资质荣誉" : "Qualification and Honor" }}
          </div>
          <div
            @click="push(5)"
            class="more"
            @mouseenter="mouseenterMore(5)"
            @mouseleave="mouseleaveMore()"
          >
            <div style="font-size: 14px" class="text">
              {{ $store.state.locale == "zh-cn" ? "了解更多" : "Explore More" }}
            </div>
            <div style="width: 20px; height: 14px; margin-left: 5px; display: flex">
              <img
                v-if="moreId == 5"
                src="@/assets/img/arrow-w-right.png"
                style="width: 20px; height: 14px"
                alt=""
              />
              <img
                v-else
                src="@/assets/img/arrow-b-right.png"
                style="width: 20px; height: 14px"
                alt=""
              />
            </div>
          </div>
        </div>
        <div style="margin-top: 28px; display: flex; justify-content: space-between">
          <vue-seamless-scroll
            :data="info.aptitude"
            style="overflow: hidden; width: 100%"
            :class-option="seamlessScrollOption"
          >
            <div style="display: flex; z-index: -1">
              <div
                style="
                  background: #f6f6f6;
                  border-radius: 10px;
                  padding: 13px;
                  margin-right: 20px;
                "
                v-for="item in info.aptitude"
                :key="item.id"
              >
                <div style="width: 210px; height: 290px">
                  {{ item.imag }}
                  <img :src="item.image" style="width: 210px; height: 290px" alt="" />
                  <!-- <el-image
                    src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
                    fit="cover"
                    style="width: 305px; height: 400px"
                    :preview-src-list="srcList"
                  ></el-image> -->
                </div>
              </div>
            </div>
          </vue-seamless-scroll>
        </div>
      </div>

      <div class="index-card" v-if="buy_model">
        <img :src="img" style="width: 100%; display: block" />
        <img
          @click="buy_model = false"
          src="https://jy-shops.oss-cn-beijing.aliyuncs.com/0dwgw/index/closed1.png"
          class="index-card-close"
        />
      </div>
    </div>
  </div>
</template>

<script>
import vueSeamlessScroll from "vue-seamless-scroll";
import carousel from "@/components/carousel.vue";
import lines from "@/components/line.vue";
export default {
  components: {
    vueSeamlessScroll,
    carousel,
    lines,
  },
  data() {
    return {
      technologyImage: "",
      img: "",
      buy_model: false,
      projectData: [{ name: 1 }, { name: 2 }, { name: 3 }, { name: 4 }],
      scroll: true,
      flag: 1, //1是赛事合作 2是新闻活动
      show: false,
      chooseFlag: "",
      srcList: [
        "https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg",
        "https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg",
      ],
      chooseData: [
        {
          name: "专业田径",
        },
        {
          name: "陆跑系列",
        },
        {
          name: "校园系列",
        },
        {
          name: "健步",
        },
        {
          name: "部队",
        },
      ],
      carouselList: [],
      info: {
        goodsData: [],
        newsList: [], //赛事合作和新闻数据
        brand: {
          introduce: {},
          history: {},
          culture: {},
        },
        aptitude: [],
      },
      category_ids: [],
      checkId: "",
      checkName: "",

      moreId: 0,
    };
  },
  mounted() {
    this.checkName = this.$store.state.locale == "zh-cn" ? "选择系列" : "Select a series";
    this.getCarousel();
    this.getHotGoods();
    this.getBrand();
    this.getDynamic();
    this.getSeries(); //选择系列
    this.getBanner(1);
    this.getAptitude(); //荣誉列表
    this.sliderFun();
  },

  computed: {
    seamlessScrollOption() {
      return {
        step: 1, // 数值越大速度滚动越快
        limitMoveNum: 5, // 开始无缝滚动的数据量 this.dataList.length
        hoverStop: true, // 是否开启鼠标悬停stop
        direction: 2, // 0向下 1向上 2向左 3向右
        openWatch: true, // 开启数据实时监控刷新dom
        singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
        singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
        waitTime: 1000, // 单步运动停止的时间(默认值1000ms)
      };
    },
    language() {
      return this.$store.state.locale;
    },
  },

  methods: {
    mouseenterMore(id) {
      this.moreId = id;
      this.$forceUpdate();
    },
    mouseleaveMore() {
      this.moreId = 0;
      this.$forceUpdate();
    },

    sliderFun() {
      const slider = document.querySelector(".slider");

      function activate(e) {
        const items = document.querySelectorAll(".item");
        e.target.matches(".next") && slider.append(items[0]);
        e.target.matches(".prev") && slider.prepend(items[items.length - 1]);
      }

      document.addEventListener("click", activate, false);
    },
    detail(item) {
      console.log(item);

      this.$router.push("/index/product/detail/" + item.id);
    },
    getAptitude() {
      this.ajaxs("index/aptitude?translate=" + this.language, {
        data: {
          limit: 10,
          page: 1,
        },
        success: (res) => {
          this.info.aptitude = res.data.data;
          console.log(this.info.aptitude);
          //this.banner = res.data;
        },
      });
    },
    clickSlides(item) {
      this.category_ids = [];
      this.category_ids.push(item.id);

      this.checkId = item.id;
      this.checkName = item.name;
      this.getHotGoods();
    },
    //多威科技
    getBanner(classify) {
      this.ajaxs("index/slides?translate=" + this.language, {
        data: {
          classify: classify,
        },
        success: (res) => {
          console.log(res);
          this.technologyImage = res.data[0].image;
          //this.banner = res.data;
        },
      });
    },
    //选择系列
    getSeries() {
      this.ajaxs("Category/series?translate=" + this.language, {
        success: (res) => {
          this.chooseData = res.data;
          // this.info.newsList = res.data.data;
        },
      });
    },
    //赛事合作和新闻活动

    getDynamic() {
      if (this.flag == 1) {
        //赛事合作
        this.ajaxs("index/competition?translate=" + this.language, {
          data: {
            limit: "4",
            page: 1,
          },
          success: (res) => {
            this.info.newsList = res.data.data;
            //  this.info.goodsData = res.data.data;
          },
        });
      } else {
        //新闻活动
        this.ajaxs("index/newsList?translate=" + this.language, {
          data: {
            limit: "4",
            page: 1,
          },
          success: (res) => {
            this.info.newsList = res.data.data;
            //  this.info.goodsData = res.data.data;
          },
        });
      }
    },
    //品牌故事
    getBrand() {
      this.ajaxs("brand/index?translate=" + this.language, {
        data: {
          classify: "introduce",
        },
        success: (res) => {
          console.log(res);

          this.info.brand = res.data;
          //  this.info.goodsData = res.data.data;
        },
      });
    },
    //热销产品
    getHotGoods() {
      this.ajaxs("goods/index?translate=" + this.language, {
        data: {
          category_ids: this.category_ids,
          keywords: "",
          limit: 4,
          page: 1,
        },
        success: (res) => {
          this.info.goodsData = res.data.data;
          //this.carouselList = res.data;
        },
      });
    },
    push(i) {
      switch (i) {
        case 1:
          //热销商品
          this.$router.push("/goodsHot");
          break;
        case 2:
          //品牌故事
          this.$router.push("/brand");
          break;
        case 3:
          //多威动态
          this.$router.push("/dynamic");
          break;
        case 4:
          this.$router.push("/technology");
          break;
        case 5:
          this.$router.push("/technology?name=资质荣誉");
          break;
      }
    },
    brand() {
      this.$router.push("/brand");
    },
    goods() {
      this.$router.push("/goodsHot");
    },
    mouseenter() {
      this.show = true;
    },
    mouseleave() {
      this.show = false;
    },

    getCarousel() {
      this.ajaxs("index/carousel?translate=" + this.language, {
        success: (res) => {
          this.carouselList = res.data;
        },
      });
    },
  },
};
</script>

<style scoped>
@import "../../assets/css/index/index.css";
.active {
  font-size: 22px;
  font-weight: bold;
}
.normal {
  color: #bebebe;
  font-size: 20px;
  /* font-weight: bold; */
}
.title {
  font-size: 22px;
  font-weight: bold;
}
.goodsActive {
  font-weight: bold;
  line-height: 40px;
  font-size: 14px;
}
.goodsNormal {
  color: #666666;
  line-height: 40px;
  font-size: 14px;
}

/* .index-swiper .el-carousel__button {
  width: 20px;
  height: 20px;
  border-radius: 10px;
} */
.carousel /deep/ .el-carousel__container .el-carousel__arrow--left {
  width: 55px !important;
  height: 55px !important;
  font-size: 24px;
  top: 40%;
}
.carousel /deep/ .el-carousel__container .el-carousel__arrow--right {
  width: 55px !important;
  height: 55px !important;
  font-size: 24px;
  top: 40%;
}
.ellipsis7 {
  overflow: hidden;
  text-overflow: ellipsis;

  display: -webkit-box;
  -webkit-box-orient: vertical;

  -webkit-line-clamp: 7;
}

body {
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

main {
  position: relative;
  width: 100%;
  height: 100%;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.item {
  width: 200px;
  height: 300px;
  list-style-type: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  background-position: center;
  background-size: cover;
  border-radius: 20px;
  box-shadow: 0 20px 30px rgba(255, 255, 255, 0.3) inset;
  transition: transform 0.1s, left 0.75s, top 0.75s, width 0.75s, height 0.75s;

  &:nth-child(1),
  &:nth-child(2) {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transform: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
  }

  &:nth-child(3) {
    left: 50%;
  }
  &:nth-child(4) {
    left: calc(50% + 220px);
  }
  &:nth-child(5) {
    left: calc(50% + 440px);
  }
  &:nth-child(6) {
    left: calc(50% + 660px);
    opacity: 0;
  }
}

.content {
  width: min(30vw, 400px);
  position: absolute;
  top: 50%;
  left: 3rem;
  transform: translateY(-50%);
  font: 400 0.85rem helvetica, sans-serif;
  color: white;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  display: none;

  & .title {
    font-family: "arial-black";
    text-transform: uppercase;
  }

  & .description {
    line-height: 1.7;
    margin: 1rem 0 1.5rem;
    font-size: 0.8rem;
  }

  & button {
    width: fit-content;
    background-color: rgba(0, 0, 0, 0.1);
    color: white;
    border: 2px solid white;
    border-radius: 0.25rem;
    padding: 0.75rem;
    cursor: pointer;
  }
}

.item:nth-of-type(2) .content {
  display: block;
  animation: show 0.75s ease-in-out 0.3s forwards;
}

@keyframes show {
  0% {
    filter: blur(5px);
    transform: translateY(calc(-50% + 75px));
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

.nav {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  user-select: none;

  & .btn {
    background-color: rgba(255, 255, 255, 0.5);
    color: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(0, 0, 0, 0.6);
    margin: 0 0.25rem;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;

    &:hover {
      background-color: rgba(255, 255, 255, 0.3);
    }
  }
}

@media (width > 650px) and (width < 900px) {
  .content {
    & .title {
      font-size: 1rem;
    }
    & .description {
      font-size: 0.7rem;
    }
    & button {
      font-size: 0.7rem;
    }
  }
  .item {
    width: 160px;
    height: 270px;

    &:nth-child(3) {
      left: 50%;
    }
    &:nth-child(4) {
      left: calc(50% + 170px);
    }
    &:nth-child(5) {
      left: calc(50% + 340px);
    }
    &:nth-child(6) {
      left: calc(50% + 510px);
      opacity: 0;
    }
  }
}

@media (width < 650px) {
  .content {
    & .title {
      font-size: 0.9rem;
    }
    & .description {
      font-size: 0.65rem;
    }
    & button {
      font-size: 0.7rem;
    }
  }
  .item {
    width: 130px;
    height: 220px;

    &:nth-child(3) {
      left: 47%;
    }
    &:nth-child(4) {
      left: calc(47% + 140px);
    }
    &:nth-child(5) {
      left: calc(47% + 280px);
    }
    &:nth-child(6) {
      left: calc(47% + 420px);
      opacity: 0;
    }
  }
}
.all {
  cursor: pointer;
  padding: 6px 13px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
  border: 1px solid #000000;
  position: relative;
}
.all::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: #000000;
  -webkit-transition: all 0.8s ease;
  transition: all 0.8s ease;
  color: white;
}
.all .text {
  position: relative;
  z-index: 2;
}
.all img {
  position: relative;
  z-index: 2;
}
.all:hover {
  position: relative;
  z-index: 2;
  color: white;
}
.all:hover:after {
  right: initial;
  left: 0;
  width: 100%;
}

.more {
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 5px;
  border: 1px solid #000000;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.more::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: #000000;
  -webkit-transition: all 0.8s ease;
  transition: all 0.8s ease;
  color: white;
}
.more .text {
  position: relative;
  z-index: 2;
}
.more img {
  position: relative;
  z-index: 2;
}
.more:hover {
  position: relative;
  z-index: 2;
  color: white;
}
.more:hover:after {
  right: initial;
  left: 0;
  width: 100%;
}
.goods:hover {
  transform: scale(1.1);
  box-shadow: 0px 0px 14px 0px rgba(96, 96, 96, 0.2);
}
.goods {
  transition: all 0.4s;
  padding: 20px;
  background-color: white;
  /* border-radius: 10px; */
}
.choose:hover {
  font-weight: bold;
  color: #000000;
}
</style>
